package net.zhangbaolin.systemadmin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.zhangbaolin.systemadmin.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 权限表(Permission)表数据库访问层
 *
 * @author zhangbaolin
 * @since 2023-09-14 15:22:21
 */
@Mapper
public interface PermissionDao extends BaseMapper<Permission> {


    /**
     * 根据用户ID查询所有权限
     */
    List<String> selectPermsByUserId(Long userId);

    /**
     * 根据用户ID查询角色
     */
    List<String> selectPermsByRole(Long roleId);

    /**
     * 根据role查询权限
     */
    List<String> selectPermsByRoleName(List<String> roleName);
}

